package com.shujia.flink.core.function;

import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.tuple.Tuple2;

/**
 * @author qx
 */
public class Demo1WordCountKeySelect implements KeySelector<Tuple2<String, Integer>,String> {
    @Override
    public String getKey(Tuple2<String, Integer> kv) {
        //返回key
        return kv.f0;
    }
}
